<!DOCTYPE html>
<html lang='zh-CN'>
<head>
    <meta charset='utf-8'>
    <script src="../script/jquery-1.8.0.min.js"></script>
    <script src="../src/jquery.upload.v2.js"></script>
</head>
<body>
        <input type="button" value="上传" id="upload"/>
<script>
    $(function(){
        $("#upload").upload({
            action: "", //上传地址
            fileName: "file",    //文件名称。用于后台接收
            params: {},         //参数
            accept: ".jpg,.png",     //文件类型
            complete: function () {  //上传完成
                alert("complete");
            },
            submit: function () {   //提交之前
                alert("submit");
            }
        });
    })
</script>
</body>
</html>